home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -seriously_amiga- / shareware / programming / other / apic / examples / ibmkey25.lst < prev    next >
File List  |  1998-01-05  |  79KB  |  1,526 lines

  1. #PIC V1.0 (c)1997 J.Petroglou    LIST FILE
  2. #file: dh2:IDE/APICforAMINET/APIC/examples/IBMKEY25.ASM
  3. #date: Sun Dec 14 20:43:20 1997
  4. #pic : PIC16C84
  5. ADDR CODE     SRCLINE SOURCECODE
  6.  
  7. 0000             000001 ;KEY.ASM
  8. 0000             000002 ;   IBM keyboard to Amiga Converter
  9. 0000             000003 ;
  10. 0000             000004 ;
  11. 0000             000005 ;        list p=16c84, f=inhx8m  ;Enter device name 
  12. 0000             000006 ;        include "p16c84.inc"
  13. 0000             000007 
  14. 0000             000008 
  15. 0000             000009 
  16. 0000             000010 
  17. 0000             000011 
  18. 0000             000012 
  19. 0000             000013 ;*******************following lines added**************************************
  20. 0000             000014 ;
  21. 0000             000015 ;The original source is Copyright © 1997 Stephen Marsden, taken from
  22. 0000             000016 ;EPic12.lha, this changes are made to assemble MPASM source on Amiga
  23. 0000             000017 ;with PICAsm.
  24. 0000             000018 ;    
  25. 0000             000019 ;
  26. 0000             000020 ;Dirk Düsterberg
  27. 0000             000021 ;
  28. 0000             000022 ;            [InterNet] duesterb@unixserv.rz.fh-hannover.de
  29. 0000             000023 ;            [Homepage] http://linux.rz.fh-hannover.de/~duesterb/
  30. 0000             000024 ;
  31. 0000             000025 
  32. 0000             000026 
  33. 0000             000027 
  34. 0000             000028         list p=16c84         ;Enter device name 
  35.  
  36. #include 'includes:p16cxx.inc' start
  37. 0000             000001     LIST
  38. 0000             000002 ; P16CXX.INC  Standard PICAsm Header File
  39. 0000             000070     LIST
  40. #include end.
  41.  
  42. 0000             000030 
  43. 0000             000031 ;16c84 spezial register (EECON1) assigns:
  44. 0000             000032 
  45. 0000             000033     CBLOCK    0
  46. 0000             000034            RD
  47. 0000             000035        WR
  48. 0000             000036        WREN
  49. 0000             000037        WRERR
  50. 0000             000038        EEIF
  51. 0000             000039     ENDC
  52. 0000             000040 
  53. 0000             000041 ;******************************************************************************
  54. 0000             000042 
  55. 0000             000043 
  56. 0000             000044 
  57. 0000             000045 
  58. 0000             000046 
  59. 0000             000047 #DEFINE PAGE0   bcf     STATUS,RP0          
  60. 0000             000048 #DEFINE PAGE1   bsf     STATUS,RP0          
  61. 0000             000049 
  62. 0000             000050 ;
  63. 0000             000051 ;------------------------------------------------------
  64. 0000             000052 ;Please define ScratchPadRam here:
  65. 0000             000053 ;If you are using PIC16C5X define "ScratchPadRam equ 0x10" 
  66. 0000             000054 ;else define "ScratchPadRam equ 0x20"
  67. 0000             000055 ;-------------------------------------------------------
  68. 0000             000056 ;
  69. 0000             000057 ScrollLock  equ     0x0
  70. 0000             000058 NumLock     equ     0x1
  71. 0000             000059 CapsLock    equ     0x2
  72. 0000             000060 Kclk        equ     0x1
  73. 0000             000061 Kdat        equ     0x0
  74. 0000             000062 Aclk        equ     0x4
  75. 0000             000063 Adat        equ     0x3
  76. 0000             000064 Arst        equ     0x2
  77. 0000             000065 Ctrlbit     equ     0x0
  78. 0000             000066 RAmigabit   equ     0x1
  79. 0000             000067 LAmigabit   equ     0x2
  80. 0000             000068 Keytype     equ     0x0
  81. 0000             000069 Resetype    equ     0x1
  82. 0000             000070 ;
  83. 0000             000071 ;
  84. 0000             000072 ScratchPadRam   equ     0x0C
  85. 0000             000073 ;
  86. 0000             000074 Capbit      equ     ScratchPadRam+0x0
  87. 0000             000075 Capdown     equ     ScratchPadRam+0x1
  88. 0000             000076 CtrlDown    equ     ScratchPadRam+0x2
  89. 0000             000077 RESET       equ     ScratchPadRam+0x3
  90. 0000             000078 Lights      equ     ScratchPadRam+0x4
  91. 0000             000079 Count3      equ     ScratchPadRam+0x5
  92. 0000             000080 ATparity    equ     ScratchPadRam+0x6
  93. 0000             000081 Make        equ     ScratchPadRam+0x7
  94. 0000             000082 Charbad     equ     ScratchPadRam+0x8
  95. 0000             000083 Oldchar     equ     ScratchPadRam+0x9
  96. 0000             000084 Amigachar   equ     ScratchPadRam+0xA
  97. 0000             000085 Count1      equ     ScratchPadRam+0xB
  98. 0000             000086 Count2      equ     ScratchPadRam+0xC
  99. 0000             000087 ATchar      equ     ScratchPadRam+0xD
  100. 0000             000088 tableoffset equ     ScratchPadRam+0xE
  101. 0000             000089 AltConfig   equ     ScratchPadRam+0xF
  102. 0000             000090 Savechar    equ     ScratchPadRam+0x10
  103. 0000             000091 returnvalue equ     ScratchPadRam+0x11
  104. 0000             000092 eeaddress   equ     ScratchPadRam+0x12
  105. 0000             000093 eedata      equ     ScratchPadRam+0x13
  106. 0000             000094 win95       equ     ScratchPadRam+0x14
  107. 0000             000095 Savechar2   equ     ScratchPadRam+0x15
  108. 0000             000096 ;
  109. 0000             000097 ;        
  110. 0000             000098         org     0x0
  111. 0000 2A64        000099         goto    start
  112. 0001             000100 
  113. 0001             000101 ATtb1 
  114. 0001 0082        000102         movwf       PCL                  
  115. 0002 344F        000103         retlw       0x4F            ;F9
  116. 0003 3400        000104         retlw       0x0               
  117. 0004 3457        000105         retlw       0x57            ;F5
  118. 0005 345B        000106         retlw       0x5B            ;F3
  119. 0006 345F        000107         retlw       0x5F            ;F1
  120. 0007 345D        000108         retlw       0x5D            ;F2
  121. 0008 3441        000109         retlw       0x41            ;F12=help
  122. 0009 3400        000110         retlw       0x0
  123. 000A 344D        000111         retlw       0x4D            ;F10
  124. 000B 3451        000112         retlw       0x51            ;F8
  125. 000C 3455        000113         retlw       0x55            ;F6
  126. 000D 3459        000114         retlw       0x59            ;F4
  127. 000E 347B        000115         retlw       0x7B            ;TAB
  128. 000F 34FF        000116         retlw       0xFF            ;~
  129. 0010 3400        000117         retlw       0x0
  130. 0011             000118 
  131. 0011 3400        000119         retlw       0x0
  132. 0012 3437        000120         retlw       0x37            ;Left ALT
  133. 0013 343F        000121         retlw       0x3F            ;Left SHIFT
  134. 0014 3400        000122         retlw       0x0
  135. 0015 2900        000123         goto    lctrl               ;Left Ctrl
  136. 0016 34DF        000124         retlw       0xDF            ;Q
  137. 0017 34FD        000125         retlw       0xFD            ;1
  138. 0018 3400        000126         retlw       0x0
  139. 0019 3400        000127         retlw       0x0
  140. 001A 3400        000128         retlw       0x0
  141. 001B 349D        000129         retlw       0x9D            ;Z
  142. 001C 34BD        000130         retlw       0xBD            ;S
  143. 001D 34BF        000131         retlw       0xBF            ;A
  144. 001E 34DD        000132         retlw       0xDD            ;W
  145. 001F 34FB        000133         retlw       0xFB            ;2
  146. 0020 3400        000134         retlw       0x0
  147. 0021             000135 
  148. 0021 3400        000136         retlw       0x0
  149. 0022 3499        000137         retlw       0x99            ;C
  150. 0023 349B        000138         retlw       0x9B            ;X
  151. 0024 34BB        000139         retlw       0xBB            ;D
  152. 0025 34DB        000140         retlw       0xDB            ;E
  153. 0026 34F7        000141         retlw       0xF7            ;4
  154. 0027 34F9        000142         retlw       0xF9            ;3
  155. 0028 3400        000143         retlw       0x0
  156. 0029 3400        000144         retlw       0x0
  157. 002A 347F        000145         retlw       0x7F            ;SPACE
  158. 002B 3497        000146         retlw       0x97            ;V
  159. 002C 34B9        000147         retlw       0xB9            ;F
  160. 002D 34D7        000148         retlw       0xD7            ;T
  161. 002E 34D9        000149         retlw       0xD9            ;R
  162. 002F 34F5        000150         retlw       0xF5            ;5
  163. 0030 3400        000151         retlw       0x0
  164. 0031             000152 
  165. 0031 3400        000153         retlw       0x0
  166. 0032 3493        000154         retlw       0x93            ;N
  167. 0033 3495        000155         retlw       0x95            ;B
  168. 0034 34B5        000156         retlw       0xB5            ;H
  169. 0035 34B7        000157         retlw       0xB7            ;G
  170. 0036 34D5        000158         retlw       0xD5            ;Y
  171. 0037 34F3        000159         retlw       0xF3            ;6
  172. 0038 3400        000160         retlw       0x0
  173. 0039 3400        000161         retlw       0x0
  174. 003A 3400        000162         retlw       0x0
  175. 003B 3491        000163         retlw       0x91            ;M
  176. 003C 34B3        000164         retlw       0xB3            ;J
  177. 003D 34D3        000165         retlw       0xD3            ;U
  178. 003E 34F1        000166         retlw       0xF1            ;7
  179. 003F 34EF        000167         retlw       0xEF            ;8
  180. 0040 3400        000168         retlw       0x0
  181. 0041             000169 
  182. 0041 3400        000170         retlw       0x0
  183. 0042 348F        000171         retlw       0x8F            ;<
  184. 0043 34B1        000172         retlw       0xB1            ;K
  185. 0044 34D1        000173         retlw       0xD1            ;I
  186. 0045 34CF        000174         retlw       0xCF            ;O
  187. 0046 34EB        000175         retlw       0xEB            ;0
  188. 0047 34ED        000176         retlw       0xED            ;9
  189. 0048 3400        000177         retlw       0x0
  190. 0049 3400        000178         retlw       0x0
  191. 004A 348D        000179         retlw       0x8D            ;>
  192. 004B 348B        000180         retlw       0x8B            ;/
  193. 004C 34AF        000181         retlw       0xAF            ;L
  194. 004D 34AD        000182         retlw       0xAD            ; ';'
  195. 004E 34CD        000183         retlw       0xCD            ;P
  196. 004F 34E9        000184         retlw       0xE9            ;-
  197. 0050 3400        000185         retlw       0x0
  198. 0051             000186 
  199. 0051 3400        000187         retlw       0x0
  200. 0052 3400        000188         retlw       0x0
  201. 0053 34AB        000189         retlw       0xAB            ;@
  202. 0054 3400        000190         retlw       0x0
  203. 0055 34CB        000191         retlw       0xCB            ;[
  204. 0056 34E7        000192         retlw       0xE7            ;=
  205. 0057 3400        000193         retlw       0x0
  206. 0058 3400        000194         retlw       0x0
  207. 0059 343B        000195         retlw       0x3B            ;CAPS LOCK?
  208. 005A 343D        000196         retlw       0x3D            ;Right SHIFT
  209. 005B 3477        000197         retlw       0x77            ;RETURN
  210. 005C 34C9        000198         retlw       0xC9            ;]
  211. 005D 3400        000199         retlw       0x0
  212. 005E 34A9        000200         retlw       0xA9            ;#=right foreign key
  213. 005F 3400        000201         retlw       0x0
  214. 0060 3400        000202         retlw       0x0
  215. 0061             000203 
  216. 0061 3400        000204         retlw       0x0
  217. 0062 349F        000205         retlw       0x9F            ;\ (next to left shift on AT keyboard)
  218. 0063 3400        000206         retlw       0x0
  219. 0064 3400        000207         retlw       0x0
  220. 0065 3400        000208         retlw       0x0
  221. 0066 3400        000209         retlw       0x0
  222. 0067 347D        000210         retlw       0x7D            ;Back SPACE
  223. 0068 3400        000211         retlw       0x0
  224. 0069 3400        000212         retlw       0x0
  225. 006A 34C5        000213         retlw       0xC5            ;1 keypad
  226. 006B 3400        000214         retlw       0x0
  227. 006C 34A5        000215         retlw       0xA5            ;4 keypad
  228. 006D 3485        000216         retlw       0x85            ;7 keypad
  229. 006E 3400        000217         retlw       0x0
  230. 006F 3400        000218         retlw       0x0
  231. 0070 3400        000219         retlw       0x0
  232. 0071             000220 
  233. 0071 34E1        000221         retlw       0xE1            ;0 keypad
  234. 0072 3487        000222         retlw       0x87            ;dot keypad
  235. 0073 34C3        000223         retlw       0xC3            ;2 keypad
  236. 0074 34A3        000224         retlw       0xA3            ;5 keypad
  237. 0075 34A1        000225         retlw       0xA1            ;6 keypad
  238. 0076 3483        000226         retlw       0x83            ;8 keypad
  239. 0077 3475        000227         retlw       0x75            ;ESCAPE!
  240. 0078 344B        000228         retlw       0x4B            ;Number Lock=( keypad   
  241. 0079 34E5        000229         retlw       0xE5            ;F11=\
  242. 007A 3443        000230         retlw       0x43            ;+ keypad
  243. 007B 34C1        000231         retlw       0xC1            ;3 keypad
  244. 007C 346B        000232         retlw       0x6B            ;- keypad
  245. 007D 3445        000233         retlw       0x45            ;* keypad
  246. 007E 3481        000234         retlw       0x81            ;9 keypad
  247. 007F 3449        000235         retlw       0x49            ;scroll Lock=) keypad 
  248. 0080 3400        000236         retlw       0x0
  249. 0081             000237 
  250. 0081             000238 ATtb2:
  251. 0081 3400        000239         retlw       0x0
  252. 0082 3400        000240         retlw       0x0
  253. 0083 3400        000241         retlw       0x0
  254. 0084 3453        000242         retlw       0x53            ;F7
  255. 0085 290D        000243         goto    prtscreen           ;print screen=R Amiga P  
  256. 0086 3400        000244         retlw       0x0
  257. 0087 3400        000245         retlw       0x0
  258. 0088 3400        000246         retlw       0x0
  259. 0089 3400        000247         retlw       0x0
  260. 008A 3400        000248         retlw       0x0
  261. 008B 3400        000249         retlw       0x0
  262. 008C 3400        000250         retlw       0x0
  263. 008D 3400        000251         retlw       0x0
  264. 008E 3400        000252         retlw       0x0
  265. 008F 3400        000253         retlw       0x0
  266. 0090 3400        000254         retlw       0x0
  267. 0091             000255 
  268. 0091 3400        000256         retlw       0x0
  269. 0092 3435        000257         retlw       0x35            ;Right ALT
  270. 0093 3400        000258         retlw       0x0
  271. 0094 3400        000259         retlw       0x0
  272. 0095 2903        000260         goto    rctrl               ;Right CTL
  273. 0096 3400        000261         retlw       0x0
  274. 0097 3400        000262         retlw       0x0
  275. 0098 3400        000263         retlw       0x0
  276. 0099 3400        000264         retlw       0x0
  277. 009A 3400        000265         retlw       0x0
  278. 009B 3400        000266         retlw       0x0
  279. 009C 3400        000267         retlw       0x0
  280. 009D 3400        000268         retlw       0x0
  281. 009E 3400        000269         retlw       0x0
  282. 009F 3400        000270         retlw       0x0
  283. 00A0 3433        000271         retlw       0x33            ;Left Win=Left Amiga
  284. 00A1             000272 
  285. 00A1 3400        000273         retlw       0x0
  286. 00A2 3400        000274         retlw       0x0
  287. 00A3 3400        000275         retlw       0x0
  288. 00A4 3400        000276         retlw       0x0
  289. 00A5 3400        000277         retlw       0x0
  290. 00A6 3400        000278         retlw       0x0
  291. 00A7 3400        000279         retlw       0x0
  292. 00A8 3431        000280         retlw       0x31            ;Right Win=Right Amiga
  293. 00A9 3400        000281         retlw       0x0
  294. 00AA 3400        000282         retlw       0x0
  295. 00AB 3400        000283         retlw       0x0
  296. 00AC 3400        000284         retlw       0x0
  297. 00AD 3400        000285         retlw       0x0
  298. 00AE 3400        000286         retlw       0x0
  299. 00AF 3400        000287         retlw       0x0
  300. 00B0 2906        000288         goto    swapscreen          ;Menu Key=L-Amiga M
  301. 00B1             000289         
  302. 00B1 3400        000290         retlw       0x0
  303. 00B2 3400        000291         retlw       0x0
  304. 00B3 3400        000292         retlw       0x0
  305. 00B4 3400        000293         retlw       0x0
  306. 00B5 3400        000294         retlw       0x0
  307. 00B6 3400        000295         retlw       0x0
  308. 00B7 3400        000296         retlw       0x0
  309. 00B8 3400        000297         retlw       0x0
  310. 00B9 3400        000298         retlw       0x0
  311. 00BA 3400        000299         retlw       0x0
  312. 00BB 3400        000300         retlw       0x0
  313. 00BC 3400        000301         retlw       0x0
  314. 00BD 3400        000302         retlw       0x0
  315. 00BE 3400        000303         retlw       0x0
  316. 00BF 3400        000304         retlw       0x0
  317. 00C0 3400        000305         retlw       0x0
  318. 00C1             000306 
  319. 00C1 3400        000307         retlw       0x0
  320. 00C2 3400        000308         retlw       0x0
  321. 00C3 3400        000309         retlw       0x0
  322. 00C4 3400        000310         retlw       0x0
  323. 00C5 3400        000311         retlw       0x0
  324. 00C6 3400        000312         retlw       0x0
  325. 00C7 3400        000313         retlw       0x0
  326. 00C8 3400        000314         retlw       0x0
  327. 00C9 3400        000315         retlw       0x0
  328. 00CA 3400        000316         retlw       0x0
  329. 00CB 348B        000317         retlw       0x8B            ;/key, supposedly
  330. 00CC 3400        000318         retlw       0x0
  331. 00CD 3400        000319         retlw       0x0
  332. 00CE 3400        000320         retlw       0x0
  333. 00CF 3400        000321         retlw       0x0
  334. 00D0 3400        000322         retlw       0x0
  335. 00D1             000323 
  336. 00D1 3400        000324         retlw       0x0
  337. 00D2 3400        000325         retlw       0x0
  338. 00D3 3400        000326         retlw       0x0
  339. 00D4 3400        000327         retlw       0x0
  340. 00D5 3400        000328         retlw       0x0
  341. 00D6 3400        000329         retlw       0x0
  342. 00D7 3400        000330         retlw       0x0
  343. 00D8 3400        000331         retlw       0x0
  344. 00D9 3400        000332         retlw       0x0
  345. 00DA 3400        000333         retlw       0x0
  346. 00DB 3479        000334         retlw       0x79            ;Numeric Enter
  347. 00DC 3400        000335         retlw       0x0
  348. 00DD 3400        000336         retlw       0x0
  349. 00DE 3400        000337         retlw       0x0
  350. 00DF 3400        000338         retlw       0x0
  351. 00E0 3400        000339         retlw       0x0
  352. 00E1             000340 
  353. 00E1 3400        000341         retlw       0x0
  354. 00E2 3400        000342         retlw       0x0
  355. 00E3 3400        000343         retlw       0x0
  356. 00E4 3400        000344         retlw       0x0
  357. 00E5 3400        000345         retlw       0x0
  358. 00E6 3400        000346         retlw       0x0
  359. 00E7 3400        000347         retlw       0x0
  360. 00E8 3400        000348         retlw       0x0
  361. 00E9 3400        000349         retlw       0x0
  362. 00EA 2914        000350         goto    endkey              ;End=Shift right-cursor  
  363. 00EB 3400        000351         retlw       0x0
  364. 00EC 3461        000352         retlw       0x61            ;Cursor Left
  365. 00ED 291B        000353         goto    home                ;Home=Shift left-cursor  
  366. 00EE 3400        000354         retlw       0x0
  367. 00EF 3400        000355         retlw       0x0
  368. 00F0 3463        000356         retlw       0x63            ;MACRO key=control
  369. 00F1             000357 
  370. 00F1 2930        000358         goto    insert              ;Insert=Right Amiga 7
  371. 00F2 3473        000359         retlw       0x73            ;Delete
  372. 00F3 3465        000360         retlw       0x65            ;Cursor Down
  373. 00F4 3400        000361         retlw       0x0
  374. 00F5 3463        000362         retlw       0x63            ;Cursor Right
  375. 00F6 3467        000363         retlw       0x67            ;Cursor Up
  376. 00F7 3400        000364         retlw       0x0
  377. 00F8 3400        000365         retlw       0x0
  378. 00F9 3400        000366         retlw       0x0
  379. 00FA 3400        000367         retlw       0x0
  380. 00FB 2922        000368         goto    pagedown            ;Page Down=Shift down-cursor
  381. 00FC 3400        000369         retlw       0x0
  382. 00FD 290D        000370         goto    prtscreen           ;print screen=Right Amiga P
  383. 00FE 2929        000371         goto    pageup              ;Page up=Shift up-cursor
  384. 00FF 2937        000372         goto    break               ;Break=Ctrl-C
  385. 0100             000373 ;        retlw       0x0
  386. 0100             000374 
  387. 0100             000375 
  388. 0100             000376 
  389. 0100             000377 ; *** Left Control key ***
  390. 0100             000378 lctrl
  391. 0100 1820        000379         btfsc   win95,0x0
  392. 0101 3439        000380         retlw   0x39                ; ctrl
  393. 0102 3433        000381         retlw   0x33                ; left Amiga
  394. 0103             000382 
  395. 0103             000383 ; *** Right Control key ***
  396. 0103             000384 rctrl
  397. 0103 1820        000385         btfsc   win95,0x0
  398. 0104 3439        000386         retlw   0x39                ; ctrl
  399. 0105 3431        000387         retlw   0x31                ; right Amiga
  400. 0106             000388         
  401. 0106             000389 
  402. 0106             000390 ; *** Menu = Left Amiga-M ***
  403. 0106             000391 swapscreen
  404. 0106 3033        000392         movlw   0x33                ; Left Amiga pressed
  405. 0107 21A0        000393         call    actualtransmit
  406. 0108 3091        000394         movlw   0x91                ; M pressed & released
  407. 0109 23B5        000395         call    sendmessage
  408. 010A 3032        000396         movlw   0x32                ; Left Amiga released
  409. 010B 21A0        000397         call    actualtransmit
  410. 010C 3400        000398         retlw   0x0          
  411. 010D             000399 
  412. 010D             000400 
  413. 010D             000401 ; *** Prt Scrn Key = Right Amiga-P ***
  414. 010D             000402 prtscreen
  415. 010D 3031        000403         movlw   0x31                ; Right Amiga pressed
  416. 010E 21A0        000404         call    actualtransmit
  417. 010F 30CD        000405         movlw   0xCD                ; P pressed & released
  418. 0110 23B5        000406         call    sendmessage
  419. 0111 3030        000407         movlw   0x30                ; Right Amiga released
  420. 0112 21A0        000408         call    actualtransmit
  421. 0113 3400        000409         retlw   0x0          
  422. 0114             000410 
  423. 0114             000411 
  424. 0114             000412 
  425. 0114             000413 ; *** End Key = Shift right-cursor ***
  426. 0114             000414 endkey
  427. 0114 303D        000415         movlw   0x3D                ; Right shift pressed
  428. 0115 21A0        000416         call    actualtransmit
  429. 0116 3063        000417         movlw   0x63                ; right-cursor pressed & released
  430. 0117 23B5        000418         call    sendmessage
  431. 0118 303C        000419         movlw   0x3C                ; Right shift released
  432. 0119 21A0        000420         call    actualtransmit
  433. 011A 3400        000421         retlw   0x0          
  434. 011B             000422 
  435. 011B             000423 
  436. 011B             000424 
  437. 011B             000425 ; *** Home Key = Shift left-cursor ***
  438. 011B             000426 home
  439. 011B 303D        000427         movlw   0x3D                ; Right shift pressed
  440. 011C 21A0        000428         call    actualtransmit
  441. 011D 3061        000429         movlw   0x61                ; left-cursor pressed & released
  442. 011E 23B5        000430         call    sendmessage
  443. 011F 303C        000431         movlw   0x3C                ; Right shift released
  444. 0120 21A0        000432         call    actualtransmit
  445. 0121 3400        000433         retlw   0x0          
  446. 0122             000434 
  447. 0122             000435 
  448. 0122             000436 
  449. 0122             000437 ; *** PageDown Key = Shift down-cursor ***
  450. 0122             000438 pagedown
  451. 0122 303D        000439         movlw   0x3D                ; Right shift pressed
  452. 0123 21A0        000440         call    actualtransmit
  453. 0124 3065        000441         movlw   0x65                ; down-cursor pressed & released
  454. 0125 23B5        000442         call    sendmessage
  455. 0126 303C        000443         movlw   0x3C                ; Right shift released
  456. 0127 21A0        000444         call    actualtransmit
  457. 0128 3400        000445         retlw   0x0          
  458. 0129             000446 
  459. 0129             000447 
  460. 0129             000448 
  461. 0129             000449 ; *** Pageup Key = Shift up-cursor ***
  462. 0129             000450 pageup
  463. 0129 303D        000451         movlw   0x3D                ; Right shift pressed
  464. 012A 21A0        000452         call    actualtransmit
  465. 012B 3067        000453         movlw   0x67                ; up-cursor pressed & released
  466. 012C 23B5        000454         call    sendmessage
  467. 012D 303C        000455         movlw   0x3C                ; Right shift released
  468. 012E 21A0        000456         call    actualtransmit
  469. 012F 3400        000457         retlw   0x0          
  470. 0130             000458 
  471. 0130             000459 
  472. 0130             000460 
  473. 0130             000461 ; *** Insert Key = Right Amiga 7 ***
  474. 0130             000462 insert
  475. 0130 3031        000463         movlw   0x31                ; Right Amiga pressed
  476. 0131 21A0        000464         call    actualtransmit
  477. 0132 30F1        000465         movlw   0xF1                ; 7 pressed & released
  478. 0133 23B5        000466         call    sendmessage
  479. 0134 3030        000467         movlw   0x30                ; Right Amiga released
  480. 0135 21A0        000468         call    actualtransmit
  481. 0136 3400        000469         retlw   0x0          
  482. 0137             000470 
  483. 0137             000471 
  484. 0137             000472 
  485. 0137             000473 ; *** Break Key = Ctrl-C ***
  486. 0137             000474 break
  487. 0137 3039        000475         movlw   0x39                ; Ctrl pressed
  488. 0138 21A0        000476         call    actualtransmit
  489. 0139 3099        000477         movlw   0x99                ; C pressed & released
  490. 013A 23B5        000478         call    sendmessage
  491. 013B 3038        000479         movlw   0x38                ; Ctrl released
  492. 013C 21A0        000480         call    actualtransmit
  493. 013D 3400        000481         retlw   0x0          
  494. 013E             000482 
  495. 013E             000483 
  496. 013E             000484 
  497. 013E             000485 ; *** Wait a long time ***
  498. 013E             000486 longdelay
  499. 013E 0097        000487         movwf   Count1
  500. 013F             000488 dly
  501. 013F 2143        000489         call    fixeddelay
  502. 0140 0B97        000490         decfsz  Count1,F
  503. 0141 293F        000491         goto    dly
  504. 0142 0008        000492         return
  505. 0143             000493 ;
  506. 0143             000494 ; *** Wait a short while ***
  507. 0143             000495 fixeddelay
  508. 0143 30FF        000496         movlw   0xFF
  509. 0144             000497 smalldelay
  510. 0144 0098        000498         movwf   Count2
  511. 0145             000499 delay
  512. 0145 0B98        000500         decfsz  Count2,F
  513. 0146 2945        000501         goto    delay
  514. 0147 0008        000502         return
  515. 0148             000503 
  516. 0148             000504 
  517. 0148             000505 
  518. 0148             000506 
  519. 0148             000507 ; *** Send character to Amiga and wait for handshake ***
  520. 0148             000508 amigatransmit
  521. 0148 0096        000509         movwf   Amigachar
  522. 0149 0215        000510         subwf   Oldchar,W
  523. 014A 1903        000511         btfsc   STATUS,Z            ; skip if not equal
  524. 014B 0008        000512         return                      ; ignore it
  525. 014C             000513         
  526. 014C 3033        000514         movlw   0x33                ; LAmiga pressed
  527. 014D 0216        000515         subwf   Amigachar,W
  528. 014E 1903        000516         btfsc   STATUS,Z            ; skip if not equal
  529. 014F 110F        000517         bcf     RESET,LAmigabit
  530. 0150 3032        000518         movlw   0x32                ; LAmiga released
  531. 0151 0216        000519         subwf   Amigachar,W
  532. 0152 1903        000520         btfsc   STATUS,Z            ; skip if not equal
  533. 0153 150F        000521         bsf     RESET,LAmigabit
  534. 0154             000522                 
  535. 0154 3031        000523         movlw   0x31                ; RAmiga pressed
  536. 0155 0216        000524         subwf   Amigachar,W
  537. 0156 1903        000525         btfsc   STATUS,Z            ; skip if not equal
  538. 0157 108F        000526         bcf     RESET,RAmigabit
  539. 0158 3030        000527         movlw   0x30                ; RAmiga released
  540. 0159 0216        000528         subwf   Amigachar,W
  541. 015A 1903        000529         btfsc   STATUS,Z            ; skip if not equal
  542. 015B 148F        000530         bsf     RESET,RAmigabit
  543. 015C             000531                 
  544. 015C 303B        000532         movlw   0x3B                ; jump if not Capslock down
  545. 015D 0216        000533         subwf   Amigachar,W
  546. 015E 1D03        000534         btfss   STATUS,Z            ; skip if equal
  547. 015F 2966        000535         goto    transok2            ; ignore it
  548. 0160 100F        000536         bcf     RESET,Ctrlbit
  549. 0161 0816        000537         movf    Amigachar,W
  550. 0162 0095        000538         movwf   Oldchar
  551. 0163 30FF        000539         movlw   0xFF
  552. 0164 008D        000540         movwf   Capdown             ; set flags for later
  553. 0165 0008        000541         return
  554. 0166             000542 transok2
  555. 0166 303A        000543         movlw   0x3A                ; jump if not Capslock up
  556. 0167 0216        000544         subwf   Amigachar,W
  557. 0168 1D03        000545         btfss   STATUS,Z            ; skip if equal
  558. 0169 2984        000546         goto    transok3            ; ignore it
  559. 016A             000547 
  560. 016A 140F        000548         bsf     RESET,Ctrlbit
  561. 016B 303B        000549         movlw   0x3B                ; see if Capslock was just down
  562. 016C 0215        000550         subwf   Oldchar,W           ; 
  563. 016D 1D03        000551         btfss   STATUS,Z            ; skip if equal
  564. 016E 297D        000552         goto    transok4            ; use as Ctrl key
  565. 016F 018D        000553         clrf    Capdown             ; clear flag
  566. 0170 098C        000554         comf    Capbit,F            ; toggle down/upness of caplock
  567. 0171 303B        000555         movlw   0x3B                ; send Capslock down
  568. 0172 1C0C        000556         btfss   Capbit,0x0
  569. 0173 39FE        000557         andlw   0xFE
  570. 0174 21A0        000558         call    actualtransmit
  571. 0175             000559 ; send lights to AT
  572. 0175 30ED        000560         movlw   0xED                ; Next data is for lights
  573. 0176 21D7        000561         call    SendtoAT
  574. 0177 1510        000562         bsf     Lights,CapsLock     ; Capslock on
  575. 0178 1C0C        000563         btfss   Capbit,0x0
  576. 0179 1110        000564         bcf     Lights,CapsLock     ; Capslock off
  577. 017A 0810        000565         movf    Lights,W
  578. 017B 21D7        000566         call    SendtoAT
  579. 017C 0008        000567         return
  580. 017D             000568 transok4
  581. 017D 1820        000569         btfsc   win95,0x0
  582. 017E 0008        000570         return
  583. 017F 018E        000571         clrf    CtrlDown
  584. 0180 018D        000572         clrf    Capdown             ; Capslock has finished acting as ctrl
  585. 0181 3038        000573         movlw   0x38                ; send Ctrl up
  586. 0182 21A0        000574         call    actualtransmit
  587. 0183 0008        000575         return
  588. 0184             000576 transok3
  589. 0184 0816        000577         movf    Amigachar,W
  590. 0185 00A1        000578         movwf   Savechar2
  591. 0186 0095        000579         movwf   Oldchar
  592. 0187 088D        000580         movf    Capdown,F           ; Capslock down?
  593. 0188 1903        000581         btfsc   STATUS,Z            ; skip if non-zero i.e caps pressed
  594. 0189 2995        000582         goto    nocontrol           ; ignore it
  595. 018A 1820        000583         btfsc   win95,0x0
  596. 018B 2995        000584         goto    nocontrol           ; ignore it
  597. 018C 088E        000585         movf    CtrlDown,F
  598. 018D 1D03        000586         btfss   STATUS,Z            ; skip if zero i.e caps pressed
  599. 018E 2995        000587         goto    nocontrol           ; ignore it
  600. 018F 30FF        000588         movlw   0xFF
  601. 0190 008E        000589         movwf   CtrlDown            ; Caps lock is now Ctrl key
  602. 0191 3039        000590         movlw   0x39                ; send Ctrl down
  603. 0192 21A0        000591         call    actualtransmit
  604. 0193 0821        000592         movf    Savechar2,W
  605. 0194 29A0        000593         goto    actualtransmit
  606. 0195             000594 nocontrol
  607. 0195 0816        000595         movf    Amigachar,W
  608. 0196 39FE        000596         andlw   0xFE
  609. 0197 3C44        000597         sublw   0x44                ; * (Numkey) released
  610. 0198 1D03        000598         btfss   STATUS,Z            ; skip if equal
  611. 0199 019B        000599         clrf    AltConfig
  612. 019A 0A9B        000600         incf    AltConfig,F
  613. 019B             000601 
  614. 019B 3028        000602         movlw   0x28                ; 20 th time?
  615. 019C 021B        000603         subwf   AltConfig,W
  616. 019D 1903        000604         btfsc   STATUS,Z            ; skip if not equal
  617. 019E 22F9        000605         call    config
  618. 019F             000606 
  619. 019F             000607 
  620. 019F 0816        000608         movf    Amigachar,W
  621. 01A0             000609 
  622. 01A0             000610 actualtransmit
  623. 01A0 0096        000611         movwf   Amigachar
  624. 01A1             000612 
  625. 01A1 3005        000613         movlw   .5           ; do a 5x256 delay
  626. 01A2 213E        000614         call    longdelay
  627. 01A3             000615 actual2
  628. 01A3 3008        000616         movlw   .8
  629. 01A4 0097        000617         movwf   Count1
  630. 01A5 0194        000618         clrf    Charbad
  631. 01A6             000619 f
  632. 01A6 1B96        000620         btfsc   Amigachar,0x7       ; IF bit7=1 THEN Adat=1
  633. 01A7 1585        000621         bsf     PORTA,Adat
  634. 01A8 1F96        000622         btfss   Amigachar,0x7       ; IF bit7=0 THEN Adat=0
  635. 01A9 1185        000623         bcf     PORTA,Adat
  636. 01AA 3008        000624         movlw   .8
  637. 01AB 2144        000625         call    smalldelay          ; Allow Adat logic to settle
  638. 01AC 1205        000626         bcf     PORTA,Aclk          ; transmit
  639. 01AD 3008        000627         movlw   .8
  640. 01AE 2144        000628         call    smalldelay          ; Allow Aclk logic to settle
  641. 01AF 1605        000629         bsf     PORTA,Aclk          ; reset Aclk=1
  642. 01B0 300A        000630         movlw   .10
  643. 01B1 2144        000631         call    smalldelay          ; Allow Aclk logic to settle
  644. 01B2 0D96        000632         rlf     Amigachar,F
  645. 01B3 0B97        000633         decfsz  Count1,F            ; Transmit next bit?
  646. 01B4 29A6        000634         goto    f
  647. 01B5             000635 
  648. 01B5 300F        000636         movlw   0xF
  649. 01B6 0097        000637         movwf   Count1
  650. 01B7 30FF        000638         movlw   0xFF
  651. 01B8 0097        000639         movwf   Count1
  652. 01B9 0098        000640         movwf   Count2
  653. 01BA             000641 
  654. 01BA 1683        000642         PAGE1          
  655. 01BB 1585        000643         bsf     TRISA,Adat          ; Read acknowledge signal
  656. 01BC 1283        000644         PAGE0          
  657. 01BD             000645 ack
  658. 01BD 0397        000646         decf    Count1,F
  659. 01BE 1903        000647         btfsc   STATUS,Z
  660. 01BF 0398        000648         decf    Count2,F
  661. 01C0 0818        000649         movf    Count2,W            ; Count2=0?
  662. 01C1 1903        000650         btfsc   STATUS,Z
  663. 01C2 29CC        000651         goto    syncup              ; no handshake
  664. 01C3 1985        000652         btfsc   PORTA,Adat         ; wait for handshake from amiga
  665. 01C4 29BD        000653         goto    ack
  666. 01C5             000654 ready
  667. 01C5 1D85        000655         btfss   PORTA,Adat          ; wait for handshake to finish
  668. 01C6 29C5        000656         goto    ready
  669. 01C7             000657 
  670. 01C7 1585        000658         bsf     PORTA,Adat          ; reset Adat=1
  671. 01C8 1683        000659         PAGE1          
  672. 01C9 1185        000660         bcf     TRISA,Adat          ; Return to output mode
  673. 01CA 1283        000661         PAGE0          
  674. 01CB 0008        000662         return
  675. 01CC             000663 syncup
  676. 01CC 1205        000664         bcf     PORTA,Aclk          ; send another clock pulse
  677. 01CD 3008        000665         movlw   .8
  678. 01CE 2144        000666         call    smalldelay          ; Allow Aclk logic to settle
  679. 01CF 1605        000667         bsf     PORTA,Aclk          ; reset Aclk=1
  680. 01D0 30FF        000668         movlw   0xFF
  681. 01D1 0097        000669         movwf   Count1
  682. 01D2 0098        000670         movwf   Count2
  683. 01D3 0391        000671         decf    Count3,F
  684. 01D4 1903        000672         btfsc   STATUS,Z
  685. 01D5 0008        000673         return
  686. 01D6 29BD        000674         goto    ack                 ; wait for acknowledge again
  687. 01D7             000675 
  688. 01D7             000676 
  689. 01D7             000677 
  690. 01D7             000678 ; *** Send character to AT keyboard and wait for handshake ***
  691. 01D7             000679 SendtoAT
  692. 01D7 0094        000680         movwf   Charbad
  693. 01D8             000681 resend
  694. 01D8 0814        000682         movf    Charbad,W
  695. 01D9 0099        000683         movwf   ATchar
  696. 01DA 0192        000684         clrf    ATparity
  697. 01DB 1486        000685         bsf     PORTB,Kclk          ; Kclk=1 get keyboards attention
  698. 01DC 0000        000686         nop
  699. 01DD 1006        000687         bcf     PORTB,Kdat          ; Kdat=0 get keyboards attention
  700. 01DE 1683        000688         PAGE1          
  701. 01DF 1086        000689         bcf     TRISB,Kclk          ; Kclk is in output mode
  702. 01E0 0000        000690         nop
  703. 01E1 1006        000691         bcf     TRISB,Kdat          ; Kdat is in output mode
  704. 01E2 1283        000692         PAGE0          
  705. 01E3 3008        000693         movlw   .8
  706. 01E4 0097        000694         movwf   Count1
  707. 01E5 1683        000695         PAGE1          
  708. 01E6 1486        000696         bsf     TRISB,Kclk          ; Kclk is in input mode
  709. 01E7 1283        000697         PAGE0          
  710. 01E8 1886        000698 Send4   btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  711. 01E9 29E8        000699         goto    Send4
  712. 01EA 1819        000700         btfsc   ATchar,0x0          ; IF bit0=1 THEN Kdat=1
  713. 01EB 1406        000701         bsf     PORTB,Kdat
  714. 01EC 1C19        000702         btfss   ATchar,0x0          ; IF bit0=0 THEN Kdat=0
  715. 01ED 1006        000703         bcf     PORTB,Kdat
  716. 01EE 0C99        000704         rrf     ATchar,F            ; next bit
  717. 01EF 1803        000705         btfsc   STATUS,C            ; test parity of bit shifted out
  718. 01F0 0A92        000706         incf    ATparity,F
  719. 01F1 1C86        000707 Send5   btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  720. 01F2 29F1        000708         goto    Send5                
  721. 01F3 0B97        000709         decfsz  Count1,F
  722. 01F4 29E8        000710         goto    Send4
  723. 01F5 1886        000711 Send6   btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  724. 01F6 29F5        000712         goto    Send6
  725. 01F7 1812        000713         btfsc   ATparity,0x0        ; IF bit0=odd THEN Kdat=0 (odd parity)
  726. 01F8 1006        000714         bcf     PORTB,Kdat
  727. 01F9 1C12        000715         btfss   ATparity,0x0        ; IF bit0=even THEN Kdat=1 (odd parity)
  728. 01FA 1406        000716         bsf     PORTB,Kdat
  729. 01FB 1C86        000717 Send7   btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  730. 01FC 29FB        000718         goto    Send7
  731. 01FD 1886        000719 Send77  btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  732. 01FE 29FD        000720         goto    Send77
  733. 01FF 1406        000721         bsf     PORTB,Kdat          ; stop bit
  734. 0200 1C86        000722 Send78  btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  735. 0201 2A00        000723         goto    Send78
  736. 0202 1683        000724         PAGE1          
  737. 0203 1406        000725         bsf     TRISB,Kdat          ; reset Kdat back to input mode
  738. 0204 1283        000726         PAGE0          
  739. 0205 1886        000727 Send79  btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  740. 0206 2A05        000728         goto    Send79
  741. 0207 1C86        000729 Send7a  btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  742. 0208 2A07        000730         goto    Send7a
  743. 0209 3008        000731         movlw   .8
  744. 020A 2144        000732         call    smalldelay          ; Allow Kclk logic to settle
  745. 020B 1086        000733         bcf     PORTB,Kclk          ; Kclk=0 Send handshake
  746. 020C 1683        000734         PAGE1          
  747. 020D 1086        000735         bcf     TRISB,Kclk          ; Kclk is in output mode
  748. 020E 1283        000736         PAGE0          
  749. 020F 3014        000737         movlw   .20
  750. 0210 2144        000738         call    smalldelay          ; Allow keyboard chance 
  751. 0211 2217        000739         call    ATgetkey
  752. 0212 30FA        000740         movlw   0xFA                ; Was transmission ok
  753. 0213 0219        000741         subwf   ATchar,W
  754. 0214 1D03        000742         btfss   STATUS,Z            ; skip if good
  755. 0215 29D8        000743         goto    resend
  756. 0216 0008        000744         return
  757. 0217             000745         
  758. 0217             000746 
  759. 0217             000747 
  760. 0217             000748 
  761. 0217             000749 ; *** Waits for keyboard to send code ***
  762. 0217             000750 ATgetkey
  763. 0217 0199        000751         clrf    ATchar
  764. 0218 1486        000752         bsf     PORTB,Kclk          ; Kclk=1 Allow keyboard to talk
  765. 0219 1683        000753         PAGE1
  766. 021A 1486        000754         bsf     TRISB,Kclk          ; Kclk is in input mode
  767. 021B 1283        000755         PAGE0
  768. 021C 1886        000756 skip1st btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  769. 021D 2A1C        000757         goto    skip1st
  770. 021E 1C86        000758 skippy  btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  771. 021F 2A1E        000759         goto    skippy
  772. 0220 3008        000760         movlw   .8
  773. 0221 0097        000761         movwf   Count1
  774. 0222             000762 ATwait0
  775. 0222 1886        000763         btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  776. 0223 2A22        000764         goto    ATwait0
  777. 0224 0C99        000765         rrf     ATchar,F
  778. 0225 1806        000766         btfsc   PORTB,Kdat
  779. 0226 1799        000767         bsf     ATchar,0x7
  780. 0227 1C06        000768         btfss   PORTB,Kdat
  781. 0228 1399        000769         bcf     ATchar,0x7
  782. 0229 1C86        000770 ATwait1 btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  783. 022A 2A29        000771         goto    ATwait1
  784. 022B 0B97        000772         decfsz  Count1,F
  785. 022C 2A22        000773         goto    ATwait0             ; get all 8 bits of data
  786. 022D 1886        000774 parity0 btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  787. 022E 2A2D        000775         goto    parity0
  788. 022F 1C86        000776 parity1 btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  789. 0230 2A2F        000777         goto    parity1
  790. 0231 1886        000778 stop0   btfsc   PORTB,Kclk          ; wait for keyboard to make Kclk=0
  791. 0232 2A31        000779         goto    stop0
  792. 0233 1C86        000780 stop1   btfss   PORTB,Kclk          ; wait for keyboard to make Kclk=1
  793. 0234 2A33        000781         goto    stop1
  794. 0235 1086        000782         bcf     PORTB,Kclk          ; Kclk=0 Send handshake
  795. 0236 1683        000783         PAGE1
  796. 0237 1086        000784         bcf     TRISB,Kclk          ; Kclk is in output mode
  797. 0238 1283        000785         PAGE0
  798. 0239 3014        000786         movlw   .20
  799. 023A 2144        000787         call    smalldelay          ; Allow keyboard chance to recieve
  800. 023B 0008        000788         return
  801. 023C             000789 
  802. 023C             000790 
  803. 023C             000791 
  804. 023C             000792 
  805. 023C             000793 
  806. 023C             000794 ; *** Flash Light ***
  807. 023C             000795 flash
  808. 023C 0090        000796         movwf    Lights
  809. 023D 30ED        000797         movlw   0xED                ; Next data is for lights
  810. 023E 21D7        000798         call    SendtoAT
  811. 023F 0810        000799         movf    Lights,W            ; Flash lights
  812. 0240 21D7        000800         call    SendtoAT
  813. 0241 3025        000801         movlw   0x25
  814. 0242 213E        000802         call    longdelay     
  815. 0243 30ED        000803         movlw   0xED                ; Next data is for lights
  816. 0244 21D7        000804         call    SendtoAT
  817. 0245 3000        000805         movlw   0x0                 ; Clear Lights
  818. 0246 21D7        000806         call    SendtoAT
  819. 0247 3025        000807         movlw   0x25
  820. 0248 213E        000808         call    longdelay     
  821. 0249 0008        000809         return
  822. 024A             000810 
  823. 024A             000811 
  824. 024A             000812 
  825. 024A             000813 ; *** Performs reset on Amiga ***
  826. 024A             000814 reset
  827. 024A 3001        000815         movlw   Resetype
  828. 024B 23D8        000816         call    readdata
  829. 024C 3C01        000817         sublw   0x1                 
  830. 024D 1903        000818         btfsc   STATUS,Z            ; skip if not equal
  831. 024E 2A5B        000819         goto    kill                ; jump if fast reset
  832. 024F 300F        000820         movlw   0x0F                ; Tell amiga we are going to reset it
  833. 0250 21A0        000821         call    actualtransmit
  834. 0251             000822 
  835. 0251 3008        000823         movlw    0x8
  836. 0252 0091        000824         movwf   Count3
  837. 0253 3001        000825 strobe  movlw    0x1
  838. 0254 223C        000826         call    flash
  839. 0255 3002        000827         movlw    0x2
  840. 0256 223C        000828         call     flash
  841. 0257 3004        000829         movlw    0x4
  842. 0258 223C        000830         call     flash
  843. 0259 0B91        000831         decfsz  Count3,F
  844. 025A 2A53        000832         goto    strobe
  845. 025B             000833 kill
  846. 025B 3070        000834         movlw   0x70
  847. 025C 213E        000835         call    longdelay     
  848. 025D 1106        000836         bcf     PORTB,Arst          ; Arst=0 Send reset
  849. 025E 1683        000837         PAGE1
  850. 025F 1106        000838         bcf     TRISB,Arst          ; Arst is in output mode
  851. 0260 1283        000839         PAGE0
  852. 0261 30FF        000840         movlw   0xFF
  853. 0262 213E        000841         call    longdelay           ; Wait for Amiga to reset
  854. 0263 2A6E        000842         goto    start2
  855. 0264             000843 
  856. 0264             000844 
  857. 0264             000845 
  858. 0264             000846 
  859. 0264             000847 start
  860. 0264             000848 
  861. 0264             000849 ; *** Allow time for HardDrive to spin upto speed ***
  862. 0264             000850 SpinUp
  863. 0264 1106        000851         bcf     PORTB,Arst          ; Arst=0 Send reset
  864. 0265 1683        000852         PAGE1
  865. 0266 1106        000853         bcf     TRISB,Arst          ; Arst is in output mode
  866. 0267 1283        000854         PAGE0
  867. 0268 3030        000855         movlw   0x30
  868. 0269 0091        000856         movwf   Count3
  869. 026A             000857 waitHD
  870. 026A 30FF        000858         movlw   0xFF
  871. 026B 213E        000859         call    longdelay           ; Wait for drive to wake up
  872. 026C 0B91        000860         decfsz  Count3,F
  873. 026D 2A6A        000861         goto    waitHD
  874. 026E             000862 
  875. 026E             000863 start2
  876. 026E             000864 ; *** Setup ports ***
  877. 026E 1605        000865         bsf     PORTA,Aclk          ; transmit
  878. 026F 0000        000866         nop
  879. 0270 1585        000867         bsf     PORTA,Adat
  880. 0271 1683        000868         PAGE1          
  881. 0272 3007        000869         movlw   0x7
  882. 0273 0085        000870         movwf   TRISA
  883. 0274 30FF        000871         movlw   0xFF
  884. 0275 0086        000872         movwf   TRISB
  885. 0276 1283        000873         PAGE0          
  886. 0277             000874 
  887. 0277             000875 
  888. 0277             000876 ; *** Clear out miscellaneous flags ***
  889. 0277 018D        000877         clrf    Capdown
  890. 0278 018E        000878         clrf    CtrlDown
  891. 0279 018C        000879         clrf    Capbit
  892. 027A 0195        000880         clrf    Oldchar
  893. 027B 019B        000881         clrf    AltConfig
  894. 027C 3007        000882         movlw   0x7
  895. 027D 008F        000883         movwf   RESET
  896. 027E             000884 
  897. 027E             000885 ; *** See what sort of keyboard is attached ***
  898. 027E 01A0        000886         clrf    win95
  899. 027F 3000        000887         movlw   Keytype
  900. 0280 23D8        000888         call    readdata
  901. 0281 3C02        000889         sublw   0x2                 
  902. 0282 1903        000890         btfsc   STATUS,Z            ; skip if not equal
  903. 0283 09A0        000891         comf    win95               ; win95=true or false
  904. 0284             000892 
  905. 0284             000893 ; *** Wait for AT keyboard to power up ***
  906. 0284             000894 waitAT
  907. 0284 1C06        000895         btfss   PORTB,Kdat         ; wait for AT keyboard
  908. 0285 2A84        000896         goto    waitAT
  909. 0286             000897         
  910. 0286             000898 ; *** Reset AT keyboard ***
  911. 0286             000899 ;        movlw   0xFF            ; Reset
  912. 0286             000900 ;        call    SendtoAT
  913. 0286 30F6        000901         movlw   0xF6            ; Default
  914. 0287 21D7        000902         call    SendtoAT
  915. 0288 3007        000903         movlw    0x7
  916. 0289 223C        000904         call    flash
  917. 028A 30ED        000905         movlw   0xED            ; Next data is for lights
  918. 028B 21D7        000906         call    SendtoAT
  919. 028C 3002        000907         movlw   0x2
  920. 028D 0090        000908         movwf   Lights
  921. 028E 21D7        000909         call    SendtoAT
  922. 028F 30F4        000910         movlw   0xF4            ; Clear buffer
  923. 0290 21D7        000911         call    SendtoAT
  924. 0291             000912 
  925. 0291             000913 
  926. 0291             000914 ATstyle
  927. 0291 088F        000915         movf    RESET,F
  928. 0292 1903        000916         btfsc   STATUS,Z
  929. 0293 2A4A        000917         goto    reset
  930. 0294 2217        000918         call    ATgetkey
  931. 0295 30E1        000919         movlw   0xE1
  932. 0296 0219        000920         subwf   ATchar,W
  933. 0297 1D03        000921         btfss   STATUS,Z            ; skip if equal
  934. 0298 2AA1        000922         goto    ATnE1        
  935. 0299 2217        000923         call    ATgetkey            ; should be $14
  936. 029A 2217        000924         call    ATgetkey            ; should be $77
  937. 029B 2217        000925         call    ATgetkey            ; should be $E1
  938. 029C 2217        000926         call    ATgetkey            ; should be $F0
  939. 029D 2217        000927         call    ATgetkey            ; should be $14
  940. 029E 2217        000928         call    ATgetkey            ; should be $F0
  941. 029F 2217        000929         call    ATgetkey            ; should be $77
  942. 02A0 2A91        000930         goto    ATstyle
  943. 02A1             000931 ATnE1
  944. 02A1 019A        000932         clrf    tableoffset
  945. 02A2 30E0        000933         movlw   0xE0
  946. 02A3 0219        000934         subwf   ATchar,W
  947. 02A4 1D03        000935         btfss   STATUS,Z            ; skip if equal
  948. 02A5 2AC0        000936         goto    ATnE0        
  949. 02A6 3080        000937         movlw   0x80
  950. 02A7 009A        000938         movwf   tableoffset
  951. 02A8 2217        000939         call    ATgetkey
  952. 02A9 30F0        000940         movlw   0xF0
  953. 02AA 0219        000941         subwf   ATchar,W
  954. 02AB 1D03        000942         btfss   STATUS,Z            ; skip if equal
  955. 02AC 2AB7        000943         goto    ATnE0F0        
  956. 02AD 2217        000944         call    ATgetkey
  957. 02AE 3012        000945         movlw   0x12
  958. 02AF 0219        000946         subwf   ATchar,W
  959. 02B0 1903        000947         btfsc   STATUS,Z            ; skip if not equal
  960. 02B1 2A91        000948         goto    ATstyle             ; E0F012 ignore it
  961. 02B2             000949 ATnEF12
  962. 02B2 3059        000950         movlw   0x59
  963. 02B3 0219        000951         subwf   ATchar,W
  964. 02B4 1D03        000952         btfss   STATUS,Z            ; skip if equal
  965. 02B5 2ACD        000953         goto    ATup        
  966. 02B6 2A91        000954         goto    ATstyle             ; E0F059 ignore it
  967. 02B7             000955 ATnE0F0
  968. 02B7 3012        000956         movlw   0x12
  969. 02B8 0219        000957         subwf   ATchar,W
  970. 02B9 1903        000958         btfsc   STATUS,Z            ; skip if not equal
  971. 02BA 2A91        000959         goto    ATstyle             ; E012 ignore it
  972. 02BB             000960 ATnE012
  973. 02BB 3059        000961         movlw   0x59
  974. 02BC 0219        000962         subwf   ATchar,W
  975. 02BD 1D03        000963         btfss   STATUS,Z            ; skip if equal
  976. 02BE 2AC6        000964         goto    ATdown        
  977. 02BF 2A91        000965         goto    ATstyle             ; E059 ignore it
  978. 02C0             000966 ATnE0
  979. 02C0 30F0        000967         movlw   0xF0
  980. 02C1 0219        000968         subwf   ATchar,W
  981. 02C2 1D03        000969         btfss   STATUS,Z            ; skip if equal
  982. 02C3 2AC6        000970         goto    ATdown        
  983. 02C4 2217        000971         call    ATgetkey
  984. 02C5 2ACD        000972         goto    ATup                ; F0= key released
  985. 02C6             000973 ATdown        
  986. 02C6 0A19        000974         incf    ATchar,W
  987. 02C7 071A        000975         addwf   tableoffset,W
  988. 02C8 2001        000976         call    ATtb1
  989. 02C9 3E00        000977         addlw   0x0                 ; test W
  990. 02CA 1D03        000978         btfss   STATUS,Z
  991. 02CB 2148        000979         call    amigatransmit
  992. 02CC 2A91        000980         goto    ATstyle
  993. 02CD             000981 ATup        
  994. 02CD 0A19        000982         incf    ATchar,W
  995. 02CE 071A        000983         addwf   tableoffset,W
  996. 02CF 009A        000984         movwf   tableoffset
  997. 02D0             000985 
  998. 02D0 30B0        000986         movlw   0xAF+1              ; menu key
  999. 02D1 021A        000987         subwf   tableoffset,W
  1000. 02D2 1903        000988         btfsc   STATUS,Z            ; skip if not equal
  1001. 02D3 2A91        000989         goto    ATstyle             ; ignore it
  1002. 02D4             000990 
  1003. 02D4 3085        000991         movlw   0x84+1              ; PrtScrn
  1004. 02D5 021A        000992         subwf   tableoffset,W
  1005. 02D6 1903        000993         btfsc   STATUS,Z            ; skip if not equal
  1006. 02D7 2A91        000994         goto    ATstyle             ; ignore it
  1007. 02D8             000995 
  1008. 02D8 30EA        000996         movlw   0xE9+1              ; End
  1009. 02D9 021A        000997         subwf   tableoffset,W
  1010. 02DA 1903        000998         btfsc   STATUS,Z            ; skip if not equal
  1011. 02DB 2A91        000999         goto    ATstyle             ; ignore it
  1012. 02DC             001000 
  1013. 02DC 30ED        001001         movlw   0xEC+1              ; Home
  1014. 02DD 021A        001002         subwf   tableoffset,W
  1015. 02DE 1903        001003         btfsc   STATUS,Z            ; skip if not equal
  1016. 02DF 2A91        001004         goto    ATstyle             ; ignore it
  1017. 02E0             001005 
  1018. 02E0 30F1        001006         movlw   0xF0+1              ; Insert
  1019. 02E1 021A        001007         subwf   tableoffset,W
  1020. 02E2 1903        001008         btfsc   STATUS,Z            ; skip if not equal
  1021. 02E3 2A91        001009         goto    ATstyle             ; ignore it
  1022. 02E4             001010 
  1023. 02E4 30FB        001011         movlw   0xFA+1              ; PageDown
  1024. 02E5 021A        001012         subwf   tableoffset,W
  1025. 02E6 1903        001013         btfsc   STATUS,Z            ; skip if not equal
  1026. 02E7 2A91        001014         goto    ATstyle             ; ignore it
  1027. 02E8             001015 
  1028. 02E8 30FD        001016         movlw   0xFC+1              ; PrtScrn
  1029. 02E9 021A        001017         subwf   tableoffset,W
  1030. 02EA 1903        001018         btfsc   STATUS,Z            ; skip if not equal
  1031. 02EB 2A91        001019         goto    ATstyle             ; ignore it
  1032. 02EC             001020 
  1033. 02EC 30FE        001021         movlw   0xFD+1              ; PageUp
  1034. 02ED 021A        001022         subwf   tableoffset,W
  1035. 02EE 1903        001023         btfsc   STATUS,Z            ; skip if not equal
  1036. 02EF 2A91        001024         goto    ATstyle             ; ignore it
  1037. 02F0             001025 
  1038. 02F0 30FF        001026         movlw   0xFE+1              ; Break
  1039. 02F1 021A        001027         subwf   tableoffset,W
  1040. 02F2 1903        001028         btfsc   STATUS,Z            ; skip if not equal
  1041. 02F3 2A91        001029         goto    ATstyle             ; ignore it
  1042. 02F4             001030 
  1043. 02F4 081A        001031         movf    tableoffset,W
  1044. 02F5 2001        001032         call    ATtb1
  1045. 02F6 39FE        001033         andlw   0xFE                ; clear bit 0
  1046. 02F7 2148        001034         call    amigatransmit
  1047. 02F8 2A91        001035         goto    ATstyle
  1048. 02F9             001036         
  1049. 02F9             001037 
  1050. 02F9             001038 
  1051. 02F9             001039 
  1052. 02F9             001040 
  1053. 02F9             001041 
  1054. 02F9             001042 
  1055. 02F9             001043 
  1056. 02F9             001044 
  1057. 02F9             001045 
  1058. 02F9             001046 
  1059. 02F9             001047 
  1060. 02F9             001048 
  1061. 02F9             001049 
  1062. 02F9             001050 ; *** Change configuration ***
  1063. 02F9             001051 config
  1064. 02F9 019E        001052         clrf    eeaddress
  1065. 02FA 303B        001053         movlw   0x3B                ; CAPSLOCK ON
  1066. 02FB 21A0        001054         call    actualtransmit
  1067. 02FC             001055         
  1068. 02FC 235C        001056         call    say_select          ; Select Type of
  1069. 02FD 237E        001057         call    say_key             ; key
  1070. 02FE 3095        001058         movlw   0x95                ; b
  1071. 02FF 23B5        001059         call    sendmessage
  1072. 0300 30CF        001060         movlw   0xCF                ; o
  1073. 0301 23B5        001061         call    sendmessage
  1074. 0302 30BF        001062         movlw   0xBF                ; a
  1075. 0303 23B5        001063         call    sendmessage
  1076. 0304 30D9        001064         movlw   0xD9                ; r
  1077. 0305 23B5        001065         call    sendmessage
  1078. 0306 30BB        001066         movlw   0xBB                ; d
  1079. 0307 23B5        001067         call    sendmessage
  1080. 0308 2385        001068         call    say_option1         ; 1=
  1081. 0309 2398        001069         call    say_uk10            ; uk 10
  1082. 030A 30FB        001070         movlw   0xFB                ; 2
  1083. 030B 23B5        001071         call    sendmessage
  1084. 030C 307F        001072         movlw   0x7F                ; space
  1085. 030D 23B5        001073         call    sendmessage
  1086. 030E 237E        001074         call    say_key             ; key
  1087. 030F 238F        001075         call    say_option2         ; 2=
  1088. 0310 2398        001076         call    say_uk10            ; uk 10
  1089. 0311 30F5        001077         movlw   0xF5                ; 5
  1090. 0312 23B5        001078         call    sendmessage
  1091. 0313 307F        001079         movlw   0x7F                ; space
  1092. 0314 23B5        001080         call    sendmessage
  1093. 0315 237E        001081         call    say_key             ; key
  1094. 0316 307F        001082         movlw   0x7F                ; space
  1095. 0317 23B5        001083         call    sendmessage
  1096. 0318 30DD        001084         movlw   0xDD                ; w
  1097. 0319 23B5        001085         call    sendmessage
  1098. 031A 30D1        001086         movlw   0xD1                ; i
  1099. 031B 23B5        001087         call    sendmessage
  1100. 031C 3093        001088         movlw   0x93                ; n
  1101. 031D 23B5        001089         call    sendmessage
  1102. 031E 30ED        001090         movlw   0xED                ; 9
  1103. 031F 23B5        001091         call    sendmessage
  1104. 0320 30F5        001092         movlw   0xF5                ; 5
  1105. 0321 23B5        001093         call    sendmessage
  1106. 0322 3077        001094         movlw   0x77                ; return 
  1107. 0323 23B5        001095         call    sendmessage
  1108. 0324 23BC        001096         call    getselection
  1109. 0325 009F        001097         movwf   eedata
  1110. 0326 081F        001098         movf    eedata,W
  1111. 0327 1903        001099         btfsc   STATUS,Z            ; skip if not zero
  1112. 0328 2AF9        001100         goto    config              ; bad choice, try again
  1113. 0329 23C8        001101         call    writedata        
  1114. 032A 23A3        001102         call    say_ok
  1115. 032B 01A0        001103         clrf    win95
  1116. 032C 3000        001104         movlw   Keytype
  1117. 032D 23D8        001105         call    readdata
  1118. 032E 3C02        001106         sublw   0x2                 
  1119. 032F 1903        001107         btfsc   STATUS,Z            ; skip if not equal
  1120. 0330 09A0        001108         comf    win95               ; win95=true or false
  1121. 0331             001109 
  1122. 0331 0A9E        001110         incf    eeaddress
  1123. 0332             001111 askreset
  1124. 0332 235C        001112         call    say_select          ; Select Type of
  1125. 0333 23AA        001113         call    say_reset           ; reset
  1126. 0334 2385        001114         call    say_option1         ; 1=
  1127. 0335 30B9        001115         movlw   0xB9                ; f
  1128. 0336 23B5        001116         call    sendmessage
  1129. 0337 30BF        001117         movlw   0xBF                ; a
  1130. 0338 23B5        001118         call    sendmessage
  1131. 0339 30BD        001119         movlw   0xBD                ; s
  1132. 033A 23B5        001120         call    sendmessage
  1133. 033B 30D7        001121         movlw   0xD7                ; t
  1134. 033C 23B5        001122         call    sendmessage
  1135. 033D 307F        001123         movlw   0x7F                ; space
  1136. 033E 23B5        001124         call    sendmessage
  1137. 033F 23AA        001125         call    say_reset           ; reset
  1138. 0340 238F        001126         call    say_option2         ; 2=
  1139. 0341 30BD        001127         movlw   0xBD                ; s
  1140. 0342 23B5        001128         call    sendmessage
  1141. 0343 30AF        001129         movlw   0xAF                ; l
  1142. 0344 23B5        001130         call    sendmessage
  1143. 0345 30CF        001131         movlw   0xCF                ; o
  1144. 0346 23B5        001132         call    sendmessage
  1145. 0347 30DD        001133         movlw   0xDD                ; w
  1146. 0348 23B5        001134         call    sendmessage
  1147. 0349 307F        001135         movlw   0x7F                ; space
  1148. 034A 23B5        001136         call    sendmessage
  1149. 034B 23AA        001137         call    say_reset           ; reset
  1150. 034C 3077        001138         movlw   0x77                ; return 
  1151. 034D 23B5        001139         call    sendmessage
  1152. 034E             001140 
  1153. 034E 23BC        001141         call    getselection
  1154. 034F 009F        001142         movwf   eedata
  1155. 0350 081F        001143         movf    eedata,W
  1156. 0351 1903        001144         btfsc   STATUS,Z            ; skip if not zero
  1157. 0352 2B32        001145         goto    askreset            ; bad choice, try again
  1158. 0353 23C8        001146         call    writedata        
  1159. 0354 23A3        001147         call    say_ok
  1160. 0355             001148 
  1161. 0355 019B        001149         clrf    AltConfig
  1162. 0356 307E        001150         movlw   0x7E                ; space up
  1163. 0357 088D        001151         movf    Capdown,F           ; Capslock down?
  1164. 0358 1903        001152         btfsc   STATUS,Z            ; skip if non-zero i.e caps pressed
  1165. 0359 303A        001153         movlw   0x3A                ; Caps up
  1166. 035A 0096        001154         movwf   Amigachar
  1167. 035B 0008        001155         return
  1168. 035C             001156         
  1169. 035C             001157 say_select
  1170. 035C 3077        001158         movlw   0x77                ; return x2
  1171. 035D 23B5        001159         call    sendmessage
  1172. 035E 23B5        001160         call    sendmessage
  1173. 035F 30BD        001161         movlw   0xBD                ; s
  1174. 0360 23B5        001162         call    sendmessage
  1175. 0361 30DB        001163         movlw   0xDB                ; e
  1176. 0362 23B5        001164         call    sendmessage
  1177. 0363 30AF        001165         movlw   0xAF                ; l
  1178. 0364 23B5        001166         call    sendmessage
  1179. 0365 30DB        001167         movlw   0xDB                ; e
  1180. 0366 23B5        001168         call    sendmessage
  1181. 0367 3099        001169         movlw   0x99                ; c
  1182. 0368 23B5        001170         call    sendmessage
  1183. 0369 30D7        001171         movlw   0xD7                ; t
  1184. 036A 23B5        001172         call    sendmessage
  1185. 036B 307F        001173         movlw   0x7F                ; space
  1186. 036C 23B5        001174         call    sendmessage
  1187. 036D 30D7        001175         movlw   0xD7                ; t
  1188. 036E 23B5        001176         call    sendmessage
  1189. 036F 30D5        001177         movlw   0xD5                ; y
  1190. 0370 23B5        001178         call    sendmessage
  1191. 0371 30CD        001179         movlw   0xCD                ; p
  1192. 0372 23B5        001180         call    sendmessage
  1193. 0373 30DB        001181         movlw   0xDB                ; e
  1194. 0374 23B5        001182         call    sendmessage
  1195. 0375 307F        001183         movlw   0x7F                ; space
  1196. 0376 23B5        001184         call    sendmessage
  1197. 0377 30CF        001185         movlw   0xCF                ; o
  1198. 0378 23B5        001186         call    sendmessage
  1199. 0379 30B9        001187         movlw   0xB9                ; f
  1200. 037A 23B5        001188         call    sendmessage
  1201. 037B 307F        001189         movlw   0x7F                ; space
  1202. 037C 23B5        001190         call    sendmessage
  1203. 037D 0008        001191         return
  1204. 037E             001192 
  1205. 037E             001193 say_key
  1206. 037E 30B1        001194         movlw   0xB1                ; k
  1207. 037F 23B5        001195         call    sendmessage
  1208. 0380 30DB        001196         movlw   0xDB                ; e
  1209. 0381 23B5        001197         call    sendmessage
  1210. 0382 30D5        001198         movlw   0xD5                ; y
  1211. 0383 23B5        001199         call    sendmessage
  1212. 0384 0008        001200         return
  1213. 0385             001201 
  1214. 0385             001202 say_option1
  1215. 0385 3077        001203        movlw   0x77                ; return x2
  1216. 0386 23B5        001204         call    sendmessage
  1217. 0387 23B5        001205         call    sendmessage
  1218. 0388 30FD        001206         movlw   0xFD                ; 1
  1219. 0389 23B5        001207         call    sendmessage
  1220. 038A 30E7        001208         movlw   0xE7                ; =
  1221. 038B 23B5        001209         call    sendmessage
  1222. 038C 307F        001210         movlw   0x7F                ; space
  1223. 038D 23B5        001211         call    sendmessage
  1224. 038E 0008        001212         return
  1225. 038F             001213 
  1226. 038F             001214 say_option2
  1227. 038F 3077        001215         movlw   0x77                ; return 
  1228. 0390 23B5        001216         call    sendmessage
  1229. 0391 30FB        001217         movlw   0xFB                ; 2
  1230. 0392 23B5        001218         call    sendmessage
  1231. 0393 30E7        001219         movlw   0xE7                ; =
  1232. 0394 23B5        001220         call    sendmessage
  1233. 0395 307F        001221         movlw   0x7F                ; space
  1234. 0396 23B5        001222         call    sendmessage
  1235. 0397 0008        001223         return
  1236. 0398             001224 
  1237. 0398             001225 say_uk10
  1238. 0398 30D3        001226         movlw   0xD3                ; u
  1239. 0399 23B5        001227         call    sendmessage
  1240. 039A 30B1        001228         movlw   0xB1                ; k
  1241. 039B 23B5        001229         call    sendmessage
  1242. 039C 307F        001230         movlw   0x7F                ; space
  1243. 039D 23B5        001231         call    sendmessage
  1244. 039E 30FD        001232         movlw   0xFD                ; 1
  1245. 039F 23B5        001233         call    sendmessage
  1246. 03A0 30EB        001234         movlw   0xEB                ; 0
  1247. 03A1 23B5        001235         call    sendmessage
  1248. 03A2 0008        001236         return
  1249. 03A3             001237 
  1250. 03A3             001238 say_ok
  1251. 03A3 30CF        001239         movlw   0xCF                ; o
  1252. 03A4 23B5        001240         call    sendmessage
  1253. 03A5 30B1        001241         movlw   0xB1                ; k
  1254. 03A6 23B5        001242         call    sendmessage
  1255. 03A7 3077        001243         movlw   0x77                ; return
  1256. 03A8 23B5        001244         call    sendmessage
  1257. 03A9 0008        001245         return
  1258. 03AA             001246 
  1259. 03AA             001247 say_reset
  1260. 03AA 30D9        001248         movlw   0xD9                ; r
  1261. 03AB 23B5        001249         call    sendmessage
  1262. 03AC 30DB        001250         movlw   0xDB                ; e
  1263. 03AD 23B5        001251         call    sendmessage
  1264. 03AE 30BD        001252         movlw   0xBD                ; s
  1265. 03AF 23B5        001253         call    sendmessage
  1266. 03B0 30DB        001254         movlw   0xDB                ; e
  1267. 03B1 23B5        001255         call    sendmessage
  1268. 03B2 30D7        001256         movlw   0xD7                ; t
  1269. 03B3 23B5        001257         call    sendmessage
  1270. 03B4 0008        001258         return
  1271. 03B5             001259 
  1272. 03B5             001260 
  1273. 03B5             001261 sendmessage
  1274. 03B5 009C        001262         movwf   Savechar
  1275. 03B6 21A0        001263         call    actualtransmit
  1276. 03B7 081C        001264         movf    Savechar,W
  1277. 03B8 39FE        001265         andlw   0xFE
  1278. 03B9 21A0        001266         call    actualtransmit
  1279. 03BA 081C        001267         movf    Savechar,W
  1280. 03BB 0008        001268         return        
  1281. 03BC             001269 
  1282. 03BC             001270 getselection
  1283. 03BC 2217        001271         call    ATgetkey
  1284. 03BD 2217        001272         call    ATgetkey
  1285. 03BE 2217        001273         call    ATgetkey
  1286. 03BF 3016        001274         movlw   0x16                ; was key 1 pressed and released
  1287. 03C0 0219        001275         subwf   ATchar,W
  1288. 03C1 1903        001276         btfsc   STATUS,Z            ; skip if not equal
  1289. 03C2 3401        001277         retlw   0x1     
  1290. 03C3 301E        001278         movlw   0x1E                ; was key 2 pressed and released
  1291. 03C4 0219        001279         subwf   ATchar,W
  1292. 03C5 1903        001280         btfsc   STATUS,Z            ; skip if not equal
  1293. 03C6 3402        001281         retlw   0x2        
  1294. 03C7 3400        001282         retlw   0x0
  1295. 03C8             001283 
  1296. 03C8             001284 writedata
  1297. 03C8 081E        001285         movf    eeaddress,W
  1298. 03C9 0089        001286         movwf   EEADR
  1299. 03CA 081F        001287         movf    eedata,W
  1300. 03CB 0088        001288         movwf   EEDATA
  1301. 03CC 1683        001289         PAGE1
  1302. 03CD 1508        001290         bsf     EECON1,WREN         ; EEPROM write enable
  1303. 03CE 3055        001291         movlw   0x55
  1304. 03CF 0089        001292         movwf   EECON2
  1305. 03D0 30AA        001293         movlw   0xAA
  1306. 03D1 0089        001294         movwf   EECON2
  1307. 03D2 1488        001295         bsf     EECON1,WR
  1308. 03D3             001296 wait_write
  1309. 03D3 1E08        001297         btfss   EECON1,EEIF         ; wait for write to finish
  1310. 03D4 2BD3        001298         goto    wait_write
  1311. 03D5 0188        001299         clrf    EECON1              ; EEPROM write disable & int accept
  1312. 03D6 1283        001300         PAGE0
  1313. 03D7 0008        001301         return
  1314. 03D8             001302 
  1315. 03D8             001303 
  1316. 03D8             001304 readdata
  1317. 03D8 0089        001305         movwf   EEADR
  1318. 03D9 1683        001306         PAGE1
  1319. 03DA 1408        001307         bsf     EECON1,RD           ; EEPROM read
  1320. 03DB 1283        001308         PAGE0
  1321. 03DC 0808        001309         movf    EEDATA,W
  1322. 03DD 0008        001310         return
  1323. 03DE             001311 
  1324. 03DE             001312 
  1325. 03DE             001313 
  1326. 03DE             001314 
  1327. 03DE             001315 
  1328. 03DE             001316 
  1329. 03DE             001317 
  1330. 03DE             001318         end
  1331.  
  1332.  
  1333. Used Symbols
  1334. -----------------------------------------
  1335. W                                00000000
  1336. F                                00000001
  1337. INDF                             00000000
  1338. TMR0                             00000001
  1339. PCL                              00000002
  1340. STATUS                           00000003
  1341. FSR                              00000004
  1342. PORTA                            00000005
  1343. PORTB                            00000006
  1344. PCLATH                           0000000A
  1345. INTCON                           0000000B
  1346. OPTION_REG                       00000081
  1347. TRISA                            00000085
  1348. TRISB                            00000086
  1349. GIE                              00000007
  1350. T0IE                             00000005
  1351. INTE                             00000004
  1352. RBIE                             00000003
  1353. T0IF                             00000002
  1354. INTF                             00000001
  1355. RBIF                             00000000
  1356. NOT_RBPU                         00000007
  1357. INTEDG                           00000006
  1358. T0CS                             00000005
  1359. T0SE                             00000004
  1360. PSA                              00000003
  1361. PS2                              00000002
  1362. PS1                              00000001
  1363. PS0                              00000000
  1364. IRP                              00000007
  1365. RP1                              00000006
  1366. RP0                              00000005
  1367. NOT_TO                           00000004
  1368. NOT_PD                           00000003
  1369. Z                                00000002
  1370. DC                               00000001
  1371. C                                00000000
  1372. EEDATA                           00000008
  1373. EEADR                            00000009
  1374. EECON1                           00000088
  1375. EECON2                           00000089
  1376. RD                               00000000
  1377. WR                               00000001
  1378. WREN                             00000002
  1379. WRERR                            00000003
  1380. EEIF                             00000004
  1381. ScrollLock                       00000000
  1382. NumLock                          00000001
  1383. CapsLock                         00000002
  1384. Kclk                             00000001
  1385. Kdat                             00000000
  1386. Aclk                             00000004
  1387. Adat                             00000003
  1388. Arst                             00000002
  1389. Ctrlbit                          00000000
  1390. RAmigabit                        00000001
  1391. LAmigabit                        00000002
  1392. Keytype                          00000000
  1393. Resetype                         00000001
  1394. ScratchPadRam                    0000000C
  1395. Capbit                           0000000C
  1396. Capdown                          0000000D
  1397. CtrlDown                         0000000E
  1398. RESET                            0000000F
  1399. Lights                           00000010
  1400. Count3                           00000011
  1401. ATparity                         00000012
  1402. Make                             00000013
  1403. Charbad                          00000014
  1404. Oldchar                          00000015
  1405. Amigachar                        00000016
  1406. Count1                           00000017
  1407. Count2                           00000018
  1408. ATchar                           00000019
  1409. tableoffset                      0000001A
  1410. AltConfig                        0000001B
  1411. Savechar                         0000001C
  1412. returnvalue                      0000001D
  1413. eeaddress                        0000001E
  1414. eedata                           0000001F
  1415. win95                            00000020
  1416. Savechar2                        00000021
  1417. ATtb1                            00000001
  1418. ATtb2                            00000081
  1419. lctrl                            00000100
  1420. rctrl                            00000103
  1421. swapscreen                       00000106
  1422. prtscreen                        0000010D
  1423. endkey                           00000114
  1424. home                             0000011B
  1425. pagedown                         00000122
  1426. pageup                           00000129
  1427. insert                           00000130
  1428. break                            00000137
  1429. longdelay                        0000013E
  1430. dly                              0000013F
  1431. fixeddelay                       00000143
  1432. smalldelay                       00000144
  1433. delay                            00000145
  1434. amigatransmit                    00000148
  1435. transok2                         00000166
  1436. transok4                         0000017D
  1437. transok3                         00000184
  1438. nocontrol                        00000195
  1439. actualtransmit                   000001A0
  1440. actual2                          000001A3
  1441. f                                000001A6
  1442. ack                              000001BD
  1443. ready                            000001C5
  1444. syncup                           000001CC
  1445. SendtoAT                         000001D7
  1446. resend                           000001D8
  1447. Send4                            000001E8
  1448. Send5                            000001F1
  1449. Send6                            000001F5
  1450. Send7                            000001FB
  1451. Send77                           000001FD
  1452. Send78                           00000200
  1453. Send79                           00000205
  1454. Send7a                           00000207
  1455. ATgetkey                         00000217
  1456. skip1st                          0000021C
  1457. skippy                           0000021E
  1458. ATwait0                          00000222
  1459. ATwait1                          00000229
  1460. parity0                          0000022D
  1461. parity1                          0000022F
  1462. stop0                            00000231
  1463. stop1                            00000233
  1464. flash                            0000023C
  1465. reset                            0000024A
  1466. strobe                           00000253
  1467. kill                             0000025B
  1468. start                            00000264
  1469. SpinUp                           00000264
  1470. waitHD                           0000026A
  1471. start2                           0000026E
  1472. waitAT                           00000284
  1473. ATstyle                          00000291
  1474. ATnE1                            000002A1
  1475. ATnEF12                          000002B2
  1476. ATnE0F0                          000002B7
  1477. ATnE012                          000002BB
  1478. ATnE0                            000002C0
  1479. ATdown                           000002C6
  1480. ATup                             000002CD
  1481. config                           000002F9
  1482. askreset                         00000332
  1483. say_select                       0000035C
  1484. say_key                          0000037E
  1485. say_option1                      00000385
  1486. say_option2                      0000038F
  1487. say_uk10                         00000398
  1488. say_ok                           000003A3
  1489. say_reset                        000003AA
  1490. sendmessage                      000003B5
  1491. getselection                     000003BC
  1492. writedata                        000003C8
  1493. wait_write                       000003D3
  1494. readdata                         000003D8
  1495.  
  1496.  
  1497. Used Defines
  1498. -----------------------------------------
  1499. PAGE0                            bcf STATUS,RP0  
  1500. PAGE1                            bsf STATUS,RP0  
  1501.  
  1502.  
  1503. PROGRAM MEMORY USAGE TABLE:    '-' = not used  'X' = used
  1504.  
  1505. 0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1506. 0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1507. 0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1508. 00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1509. 0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1510. 0140 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1511. 0180 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1512. 01C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1513. 0200 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1514. 0240 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1515. 0280 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1516. 02C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1517. 0300 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1518. 0340 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1519. 0380 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
  1520. 03C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXX-- ---------------- ----------------
  1521.  
  1522. Program Memory Words Used:  0990
  1523. Program Memory Words Free:  0034
  1524.  
  1525. Errors: 0
  1526.